import type { AxiosResponse } from 'axios'
import type { Res } from '/@/tool/Res'
import type { Param } from '/@/tool/Param'

// import coreTool from '/@/tool/coreTool'
import coreAxios from '/@/tool/coreAxios'

import type { LoginAO } from '/@/model/cn/core/tool/ao/LoginAO'
import type { LoginVO } from '/@/model/cn/core/tool/vo/LoginVO'

const urlLogin: string = 'login'

/**
 * 工具 REST API
 */
export default {
  /**
   * 登录
   * param 参数
   */
  login(param: Param<LoginAO>): Promise<AxiosResponse<Res<LoginVO>>> {
    return coreAxios.post<Res<LoginVO>>(urlLogin, param)
  },
}
